function t(t, a, e) {
    return a in t ? Object.defineProperty(t, a, {
        value: e,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[a] = e, t;
}

for (var a, e = new Date(), s = [], i = [], d = [], n = 2015; n <= e.getFullYear(); n++) s.push(n);

for (var r = 1; r <= 12; r++) i.push(r);

for (var o = 1; o <= 31; o++) d.push(o);

Page({
    data: {
      cancelRefund: !1,
      time_start: [],
      noAddress: !1,
      page_loading: !0,
      years: s,
      months: i,
      days: d,
      status: "1",
      _num: "-1",
      more_list: !1,
      addressId: "0",
      page: 2,
      notRefund: !1,
      isRefund: !1,
      openAddress: !1,
      isReason: !1,
      menu: [{
        name: "待收货",
        value: "2"
      }, {
        name: "待处理",
        value: "6"
      }, {
        name: "已完成",
        value: "3"
      }],
      active: null,
      show: !1,
      start: [],
      end: [],
      search: !1,
      keyword: "",
      list: [],
      candidate: [],
      date_start: "",
      date_end: "",
      time: 0,
      inSearch: !1,
      address: [],
      today: "",
      yesterday: "",
      weekday: "",
      chooseTime: !1,
      isWaiMaiModal: false,
      is_data: false,
      is_uu: false,
      is_peisong: false,
      waiMaiSendType: '',
      shangJiaLiuYan: ''
    },
    onLoad: function(t) {
        getApp().device().indexOf("iphone_x") > -1 && this.setData({
            iphone_x: !0
        }), t.msg && this.setData({
            msg: !0
        });
        getApp().page.onLoad(this, t)
        var a = new Date(), e = a.getFullYear(), s = a.getMonth() + 1;
        s >= 1 && s <= 9 && (s = "0" + s);
        var i = e + "-" + s + "-" + a.getDate(), d = Date.parse(new Date()), n = 1e3 * (d / 1e3 - 86400), r = new Date(n), o = r.getFullYear(), p = r.getMonth() + 1;
        p >= 1 && p <= 9 && (p = "0" + p);
        var c = o + "-" + p + "-" + r.getDate(), u = 1e3 * (d / 1e3 - 604800), g = new Date(u), h = g.getFullYear(), l = g.getMonth() + 1;
        l >= 1 && l <= 9 && (l = "0" + l);
        var f = h + "-" + l + "-" + g.getDate();
        this.setData({
            today: i,
            yesterday: c,
            weekday: f
        }), t.status > -1 && this.setData({
            _num: t.status
        }), t.refund > 0 && this.setData({
            status: 2
        }), t.no && (t.no > 0 ? this.setData({
            search: !0,
            inSearch: !0,
            keyword: t.no
        }) : "RE" == t.no.slice(0, 2) && this.setData({
            status: 2,
            search: !0,
            inSearch: !0,
            keyword: t.no
        }), this.getList());
    },
    toRefundOrder: function(t) {
        var a = t.currentTarget.dataset.id;
        this.setData({
            list: [],
            status: 2,
            search: !0,
            inSearch: !0,
            keyword: a
        }), this.getList();
    },
    toCall: function(t) {
        var a = t.currentTarget.dataset.mobile;
        this.setData({
            callPhone: !this.data.callPhone,
            mobile: a
        });
    },
    look: function(t) {
        var a = t.currentTarget.dataset.src;
        getApp().api.previewImage({
            current: a,
            urls: [ a ]
        });
    },
    toExpress: function(t) {
        var a = t.currentTarget.dataset.id, e = t.currentTarget.dataset.send, s = t.currentTarget.dataset.refund;
        a > 0 ? getApp().core.navigateTo({
            url: "/app_admin/send/send?id=" + a + "&is_send=" + e
        }) : s && getApp().core.navigateTo({
            url: "/app_admin/send/send?order_refund_id=" + s + "&is_send=" + e
        });
    },
    toSendType: function() {
        var t = this;
        1 == this.data.sendType ? this.data.detail.status_cn ? (getApp().core.showLoading({
            title: "加载中"
        }), getApp().request({
            url: getApp().apiUrl.app_admin.refund_handle,
            data: {
                is_express: 0,
                merchant_remark: "",
                type: this.data.detail.type,
                is_agree: 1,
                order_refund_id: this.data.detail.id
            },
            method: "post"
        }).then(function(a) {
            getApp().iView.$Toast.hide(), 0 == a.data.code ? (getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "success",
                mask: !1
            }), t.setData({
                list: [],
                isSend: !1,
                sendType: 0
            }), t.getList()) : getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "warning"
            });
        }).catch(function(t) {
            getApp().iView.$Toast({
                content: t.data.msg,
                duration: 2,
                type: "error"
            });
        })) : (getApp().core.showLoading({
            title: "加载中"
        }), getApp().request({
            url: getApp().api.admin.order.send,
            data: {
                is_express: 0,
                words: "",
                order_id: this.data.detail.id
            },
            method: "post",
            success: function(a) {
              getApp().core.hideLoading(), 0 == a.code ? (getApp().core.showToast({
                title: a.msg,
                icon: 'none'
              }), t.setData({
                list: [],
                isSend: !1,
                sendType: 0
              }), t.getList()) : getApp().core.showToast({
                title: a.msg,
                icon: 'none'
              });
            },
            fail: function(t) {
              getApp().core.showToast({
                title: t.msg,
                icon:'none'
              });
            }
        })) : (this.setData({
            isSend: !1
          }), this.data.detail.status_cn ? getApp().core.navigateTo({
            url: "/app_admin/send/send?order_refund_id=" + this.data.detail.id
        }) : getApp().core.navigateTo({
            url: "/app_admin/send/send?id=" + this.data.detail.id
        }));
    },
    agree: function() {
        var t = this;
        getApp().core.showLoading({
            title: "处理中"
        }), t.data.detail.refund_price > 0 ? getApp().request({
            url: getApp().api.admin.order.refund_handle,
            data: {
              order_refund_id: t.data.detail.order_refund_id,
                type: t.data.detail.type,
                is_agree: 1,
                orderType:'STORE',
                refund:1,
                refund_price: t.data.detail.refund_price,
                action:1
            },
            method: "post",
            success: function (a) {
              getApp().core.hideLoading(), 0 == a.code ? (getApp().core.showToast({
                title: a.msg,
                icon: 'none'
              }), t.setData({
                list: [],
                notRefund: !1,
                openAddress: !1,
                isRefund: !1,
                addressId: 0
              }), t.getList()) : getApp().core.showToast({
                title: a.msg,
                icon:'none'
              });
            },
            fail: function(t) {
              getApp().core.showToast({
                title: t.msg,
                icon:'none'
              });
            }
        }) : getApp().core.showToast({
            title: "退款金额需大于零",
            icon:'none'
        });
    },
    keywordSearch: function(t) {
        var a = t.currentTarget.dataset.keyword;
        this.setData({
            keyword: a,
            searchResult: !0
        }), this.getList();
    },
    decline: function(t) {
        var a = t.currentTarget.dataset.type, e = this;
        if (1 == a && e.data.addressId < 1) return getApp().core.showToast({
            title: "请选择地址",
            icon:'none'
        }), !1;
      var data = {
        order_refund_id: e.data.detail.order_refund_id,
        type: e.data.detail.type,
        action: a,
        address_id: e.data.addressId,
        // refund_price: e.data.detail.refund_price,
        orderType: 'STORE'
      }
      if (e.data.detail.type == 1) {
        data.refund_price = e.data.detail.refund_price
      }
        this.data.cancelRefund && (a = 2), getApp().core.showLoading({
            title: "处理中"
        }), getApp().request({
            url: getApp().api.admin.order.refund_handle,
            data: data,
            method: "post",
            success: function (t) {
              getApp().core.hideLoading(), 0 == t.code ? (getApp().core.showToast({
                title: t.msg
              }), e.setData({
                list: [],
                notRefund: !1,
                cancelOrder: !1,
                openAddress: !1,
                addressId: 0
              }), e.getList()) : getApp().core.showToast({
                title: t.msg,
                icon: 'none'
              });
            },
            fail: function(t) {
              getApp().core.showToast({
                title: t.data.msg,
                icon:'none'
              });
            }
        })
    },
    decline: function(t) {
        var a = t.currentTarget.dataset.type, e = this;
        if (1 == a && e.data.addressId < 1) return getApp().core.showToast({
            title: "请选择地址",
            icon:'none'
        }), !1;
      var data = {
        order_refund_id: e.data.detail.order_refund_id,
        type: e.data.detail.type,
        action: a,
        address_id: e.data.addressId,
        orderType: 'STORE'
      }
      if (e.data.detail.type == 1) {
        data.refund_price = e.data.detail.refund_price
      }
      if (a == 2) {
        data.remark = e.data.about
      }
      
        this.data.cancelRefund && (a = 2), getApp().core.showLoading({
            title: "处理中"
        }), getApp().request({
            url: getApp().api.admin.order.refund_handle,
            data: data,
            method: "post",
            success: function (t) {
              getApp().core.hideLoading(), 0 == t.code ? (getApp().core.showToast({
                title: t.msg
              }), e.setData({
                list: [],
                notRefund: !1,
                cancelOrder: !1,
                openAddress: !1,
                addressId: 0
              }), e.getList()) : getApp().core.showToast({
                title: t.msg,
                icon: 'none'
              });
            },
            fail: function(t) {
              getApp().core.showToast({
                title: t.data.msg,
                icon:'none'
              });
            }
        })
    },
    call: function() {
        getApp().core.makePhoneCall({
            phoneNumber: this.data.mobile
        }), this.setData({
            callPhone: !this.data.callPhone
        });
    },
    toTime: function() {
        var t = this, a = [], e = [], s = void 0, i = void 0;
        s = t.data.date_start ? t.data.date_start : t.data.today, i = t.data.date_end ? t.data.date_end : t.data.today, 
        t.data.years.forEach(function(e, i) {
            s.substring(0, 4) == t.data.years[i] && (a[0] = +i);
        }), t.data.months.forEach(function(e, i) {
            s.substring(5, 7) == t.data.months[i] && (a[1] = +i);
        }), t.data.days.forEach(function(e, i) {
            s.substring(8, 10) == t.data.days[i] && (a[2] = +i);
        }), t.data.date_end && (i = t.data.date_end), t.data.years.forEach(function(a, s) {
            i.substring(0, 4) == t.data.years[s] && (e[0] = +s);
        }), t.data.months.forEach(function(a, s) {
            i.substring(5, 7) == t.data.months[s] && (e[1] = +s);
        }), t.data.days.forEach(function(a, s) {
            i.substring(8, 10) == t.data.days[s] && (e[2] = +s);
        }), t.setData({
            chooseTime: !t.data.chooseTime,
            start: a,
            end: e,
            show: !1
        });
    },
    toRefund: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            isRefund: !this.data.isRefund,
            detail: a
        });
    },
    chooseSend: function(t) {
        var a = this, e = t.currentTarget.dataset.send;
        a.setData({
            sendType: e
        });
    },
    change: function(t) {
        var a = this, e = t.currentTarget.dataset.time, s = !1;
        4 == e && (s = !0, a.setData({
            date_end: this.data.today,
            date_start: this.data.today + " 00:00:00"
        })), a.setData({
            time: e,
            custom: s
        });
    },
    toChoose: function() {
        var t = this;
        if (4 != t.data.time) {
            var a = "", e = t.data.today + " 23:59:59";
            switch (t.data.time) {
              case "0":
                a = "", e = "";
                break;

              case "1":
                a = t.data.today;
                break;

              case "2":
                a = t.data.yesterday, e = t.data.yesterday + " 23:59:59";
                break;

              case "3":
                a = t.data.weekday;
            }
            setTimeout(function() {
                t.setData({
                    date_start: a,
                    date_end: e
                }), setTimeout(function() {
                    t.getList(), t.setData({
                        chooseTime: !1
                    });
                }, 200);
            }, 300);
        } else {
            var s = this.data.date_end.substring(0, 10), i = this.data.date_start.substring(0, 10), d = s.split("-"), n = i.split("-");
            +d[0] < +n[0] ? getApp().iView.$Toast({
                content: "结束时间不应早于开始时间",
                duration: 1,
                type: "warning"
            }) : +d[0] == +n[0] ? +d[1] < +n[1] ? getApp().iView.$Toast({
                content: "结束时间不应早于开始时间",
                duration: 1,
                type: "warning"
            }) : +d[1] == +n[1] && +d[2] < +n[2] ? getApp().iView.$Toast({
                content: "结束时间不应早于开始时间",
                duration: 1,
                type: "warning"
            }) : (t.getList(), t.setData({
                chooseTime: !1
            })) : (t.getList(), t.setData({
                chooseTime: !1
            }));
        }
    },
    startChange: function(t) {
        var a = t.detail.value, e = (this.data.years, this.data.years[a[0]]), s = this.data.months[a[1]], i = this.data.days[a[2]];
        s >= 1 && s <= 9 && (s = "0" + s), i >= 1 && i <= 9 && (i = "0" + i);
        var d = e + "-" + s + "-" + i;
        this.setData({
            date_start: d
        });
    },
    endChange: function(t) {
        var a = t.detail.value, e = this.data.years[a[0]], s = this.data.months[a[1]], i = this.data.days[a[2]];
        s >= 1 && s <= 9 && (s = "0" + s), i >= 1 && i <= 9 && (i = "0" + i);
        var d = e + "-" + s + "-" + i + " 23:59:59";
        this.setData({
            date_end: d
        });
    },
    chooseItem: function(t) {
        var a = t.currentTarget.dataset.num, e = void 0;
        this.data.menu.forEach(function(t, s) {
            t.value == a && (e = t);
        }), this.setData({
            _num: a,
            active: e,
            show: !this.data.show,
            list: []
        }), this.getList();
    },
    toggle: function() {
        this.setData({
            show: !this.data.show
        });
    },
    clear: function() {
        var t = this;
        getApp().api.removeStorage({
            key: "keyword",
            success: function(a) {
                t.setData({
                    candidate: []
                }), getApp().iView.$Toast({
                    content: "清理成功",
                    duration: 2,
                    type: "success",
                    mask: !1
                });
            }
        });
    },
    search: function(t) {
        this.getList();
        var a = getApp().api.getStorageSync("keyword");
        0 != this.data.keyword.length && (a.length > 0 ? a.unshift(this.data.keyword) : a = [ this.data.keyword ], 
        a.forEach(function(t, e) {
            a[0] == a[e] && e > 0 && a.splice(e, 1);
        }), getApp().api.setStorage({
            key: "keyword",
            data: a
        }), this.setData({
            inSearch: !0,
            searchResult: !0
        }));
    },
    cancel: function() {
        this.setData({
            date_start: "",
            date_end: "",
            isRefund: !1,
            chooseTime: !1,
            noRefund: !1,
            changePrice: !1,
            cancelOrder: !1,
            callPhone: !1,
            isSend: !1,
            notRefund: !1,
            openAddress: !1,
            isReason: !1,
            addressId: 0
        });
    },
    cancelSeacrch: function() {
        this.setData({
            search: !1,
            keyword: "",
            list: []
        }), this.getList();
    },
    input: function(t) {
        this.setData({
            keyword: t.detail.value
        });
    },
    changeRefundPrice: function(t) {
        var a = this.data.detail;
        a.refund_price = t.detail.value, this.setData({
            detail: a
        });
    },
    toAbout: function(t) {
        this.setData({
            about: t.detail.value
        });
    },
    priceInput: function(t) {
        var a = void 0;
        a = t.detail.value > -.01 ? "￥" + (+t.detail.value + +this.data.express).toFixed(2) : "数据有误", 
        this.setData({
            price: t.detail.value,
            total: a
        });
    },
    expressInput: function(t) {
        var a = void 0;
        a = t.detail.value > -.01 ? "￥" + (+t.detail.value + +this.data.price).toFixed(2) : "数据有误", 
        this.setData({
            express: t.detail.value,
            total: a
        });
    },
    toSearch: function() {
        var t = getApp().core.getStorageSync("keyword");
        this.setData({
            search: !0,
            list: [],
            searchResult: !1,
            candidate: t,
            inSearch: !1
        });
    },
    getList: function() {
        var t = this, a = void 0;
      1 == this.data.status ? a = getApp().api.admin.order.get_list : 2 == this.data.status && (a = getApp().api.admin.order.get_refund), 
        getApp().core.showLoading({
            title: '加载中'
        }), getApp().request({
            url: a,
            data: {
                status: t.data._num,
                date_end: t.data.date_end,
                date_start: t.data.date_start,
                keyword: t.data.keyword
            },
            method: "post",
            success: function(a) {
              getApp().core.hideLoading();
              if ( 0 == a.code) {
                var e = a.data.list;
                var i = !1;
                if (t.data.status == 2) {
                  t.setData({
                    address: a.data.address
                  })
                }
                20 == e.length && (i = !0), t.setData({
                  list: e,
                  more_list: i
                });
              } else getApp().core.showToast({
                title: a.data.msg,
                duration: 2,
                type: "warning"
              });
            },
          fail: function (t) {
              getApp().core.showToast({
                content: t.data.msg,
                duration: 2,
                type: "error"
              });
            }
        })
    },
    getMore: function(t) {
        var a = this, e = this, s = void 0;
        1 == this.data.status ? s = getApp().api.admin.order.get_list : 2 == this.data.status && (s = getApp().apiUrl.app_admin.refund), 
          getApp().core.showLoading({
            title: "加载中"
          }), getApp().request({
            url: s,
            data: {
              status: e.data._num,
              date_end: e.data.date_end,
              date_start: e.data.date_start,
              keyword: e.data.keyword,
              page: t
            },
            method: "post",
            success: function (a) {
              getApp().core.hideLoading()
              if (0 == a.code) {
                var i = a.data.list, d = e.data.list;

                var list = e.data.list.concat(a.data.list);
                20 == d.length && (n = !0), i = i.concat(d), t++ , e.setData({
                  list: list,
                  more_list: n,
                  page: t
                });
              } else getApp().core.showToast({
                content: a.data.msg,
                duration: 2,
                type: "warning"
              });
            },
            fail: function (t) {
              getApp().core.showToast({
                content: t.data.msg,
                duration: 2,
                type: "error"
              });
            }
          })
    },
    noCancel: function() {
        var t = this;
        getApp().iView.$Toast({
            type: "loading",
            duration: 0
        }), getApp().request({
            url: getApp().apiUrl.app_admin.cancel,
            data: {
                status: 2,
                remark: this.data.about,
                order_id: t.data.detail.id
            },
            method: "post"
        }).then(function(a) {
            getApp().iView.$Toast.hide(), 0 == a.data.code ? (getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "success",
                mask: !1
            }), t.setData({
                list: [],
                noRefund: !1
            }), t.getList()) : getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "warning"
            });
        }).catch(function(t) {
            getApp().iView.$Toast({
                content: t.data.msg,
                duration: 2,
                type: "error"
            });
        });
    },
    cancelSubmit: function() {
        var t = this;
        getApp().core.showLoading({
            type: "loading"
        }), getApp().request({
            url: getApp().api.admin.order.cancel,
            data: {
                status: 1,
                remark: "",
                order_id: t.data.detail.id
            },
            method: "post",
            success: function (a) {
              getApp().core.hideLoading()
              0 == a.code ? (getApp().core.showToast({
                title: "取消成功",
                icon: 'none'
              }), t.setData({
                list: [],
                isRefund: !1,
                cancelOrder: !1
              }), t.getList()) : getApp().core.showToast({
                  title: a.msg,
                  icon: 'none'
              });
            },
            fail: function(t) {
              getApp().core.hideLoading()
              getApp().core.showToast({
                title: t.data.msg,
                icon:'none'
              });
            }
        })
    },
    tab: function(t) {
        var a = t.currentTarget.dataset.num;
        this.setData({
            _num: a,
            active: null,
            list: [],
            date_start: "",
            date_end: "",
            keyword: "",
            page: 2
        }), this.getList();
    },
    tabStatus: function(t) {
        var a = t.currentTarget.dataset.status;
        this.setData({
            status: a,
            active: null,
            list: [],
            date_start: "",
            date_end: "",
            keyword: "",
            show: !1,
            _num: "-1",
            page: 2
        }), this.getList();
    },
    lookAbout: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            detail: a,
            isReason: !0
        });
    },
    chooseAddress: function(t) {
        var a = t.currentTarget.dataset.address;
        a == this.data.addressId && (a = ""), this.setData({
            addressId: a
        });
    },
    refundHandle: function(t) {
        var a = t.currentTarget.dataset.type, e = t.currentTarget.dataset.detail;
        1 == t.currentTarget.dataset.cancel && this.setData({
            cancelRefund: !0
        }), 1 == a ? 0 == this.data.address.length ?getApp().core.showToast({title:'请先去PC后台添加退货地址',icon:"none"}) : this.setData({
            detail: e,
            openAddress: !0
        }) : 2 == a ? this.setData({
            detail: e,
            notRefund: !0
        }) : 3 == a && this.setData({
            detail: e,
            notRefund: !0
        });
    },
    toAddress: function(t) {
        var a = t.detail.index;
        0 == a ? this.setData({
            noAddress: !1
        }) : 1 == a && getApp().api.navigateTo({
            url: "/pages/address/address?refund=1"
        });
    },
    beNotRefund: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            noRefund: !this.data.noRefund,
            detail: a
        });
    },
    toCancelorder: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            cancelOrder: !this.data.cancelOrder,
            detail: a
        });
    },
    toAgreeCancel: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            isRefund: !this.data.isRefund,
            detail: a
        });
    },
    submitChange: function() {
        var t = this;
        getApp().iView.$Toast({
            type: "loading",
            duration: 0
        }), t.data.price > -.01 && t.data.express > -.01 ? getApp().request({
            url: getApp().apiUrl.app_admin.update_price,
            data: {
                order_id: t.data.detail.id,
                total_price: t.data.price,
                express_price: t.data.express
            },
            method: "post"
        }).then(function(a) {
            getApp().iView.$Toast.hide(), 0 == a.data.code ? (getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "success",
                mask: !1
            }), t.setData({
                list: [],
                changePrice: !1
            }), t.getList()) : getApp().iView.$Toast({
                content: a.data.msg,
                duration: 2,
                type: "warning"
            });
        }).catch(function(t) {
            getApp().iView.$Toast({
                content: t.data.msg,
                duration: 2,
                type: "error"
            });
        }) : t.data.price && "number" == typeof t.data.price ? t.data.express && "number" == typeof t.data.express || getApp().iView.$Toast({
            content: "运费必须大于等于0",
            duration: 2,
            type: "warning"
        }) : getApp().iView.$Toast({
            content: "商品总价必须大于等于0",
            duration: 2,
            type: "warning"
        });
    },
    cancelWaiMaiModal: function () {
        this.setData({
            isWaiMaiModal: false,
            is_data: false,
            is_uu: false,
            is_peisong: false,
            shangJiaLiuYan: '',
            waiMaiSendType: ''
        })
    },
    toShangJiaLiuYan: function (t) {
        this.setData({
            shangJiaLiuYan: t.detail.value
        });
    },
    chooseWaiMaiSend: function (t) {
        var type = t.currentTarget.dataset.send;
        this.setData({
            waiMaiSendType: type
        })
    },
    toSendWaiMai: function () {
        var that = this;
        if (this.data.waiMaiSendType == '') {
            getApp().core.showToast({title:'请选择发货方式',icon:"none"})
            return
        }
        getApp().core.showLoading({
            title: "操作中"
        })
        getApp().request({
            url: getApp().api.admin.order.waimai_send,
            data: {
                order_id: this.data.detail.id,
                is_express: this.data.waiMaiSendType,
                words: this.data.shangJiaLiuYan
            },
            method: "post",
            success: function (res) {
              getApp().core.hideLoading()
              if (res.code == 0) {
                that.setData({
                    list: []
                })
                that.cancelWaiMaiModal()
                that.getList()
              } else {
                getApp().core.showToast({
                    title: res.msg,
                    icon:'none'
                });
              }
            },
            fail: function(t) {
              getApp().core.hideLoading()
              getApp().core.showToast({
                title: t.msg,
                icon:'none'
              });
            }
        })
    },
    toSend: function(t) {
        var that = this;
        var a = t.currentTarget.dataset.detail;
        if (a.is_dada != 0) {
            getApp().core.showLoading({
                title: "加载中"
            })
            getApp().request({
                url: getApp().api.admin.order.get_waimai_send_type,
                data: {
                    order_id: a.id
                },
                method: "post",
                success: function (res) {
                  getApp().core.hideLoading()
                  that.setData({
                      is_dada: res.data.is_dada,
                      is_peisong: res.data.is_peisong,
                      is_uu: res.data.is_uu
                  })
                },
                fail: function(t) {
                  getApp().core.hideLoading()
                  getApp().core.showToast({
                    title: t.data.msg,
                    icon:'none'
                  });
                }
            })
            this.setData({
                isWaiMaiModal: true,
                detail: a
            })
        } else {
            this.setData({
                isSend: !0,
                detail: a
            });
        }
    },
    toChange: function(t) {
        var a = t.currentTarget.dataset.detail;
        this.setData({
            changePrice: !this.data.changePrice,
            price: a.total_goods_price,
            detail: a,
            express: a.express_price,
            total: "￥" + a.total_pay_price
        });
    },
    onReady: function(t) {
        this.setData({
            page_loading: !1
        });
    },
    onShow: function() {
        this.data.search || this.getList();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        this.data.more_list && this.getMore(this.data.page);
    },
    onShareAppMessage: function() {}
});